<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/modules/cms/front/include/taglib.jsp" %>
<%@ page import="org.apache.shiro.web.filter.authc.FormAuthenticationFilter" %>
<head>
    <meta charset="UTF-8">
    <title>商户注册</title>
    <link href="${ctxStatic}/merchant/css/layui.css" rel="stylesheet" type="text/css">
    <link href="${ctxStatic}/merchant/css/index.css" rel="stylesheet" type="text/css">
    <link href="${ctxStatic}/merchant/css/checkInSuccess.css" rel="stylesheet" type="text/css">
    <script src="${ctxStatic}/merchant/js/jquery-3.3.1.min.js" type="text/javascript"></script>
    <script src="${ctxStatic}/merchant/js/layui.all.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready(function () {

            $(document).ready(function () {

                //返回登录
                $('.back').on('click', function () {
                    window.location.href = "${fns:getFrontPath()}" + "/enter";
                })


                //返回重新申请
                $('#regagin').on('click', function () {
                    window.location.href = "${fns:getFrontPath()}" + "/registerAgain";
                })

            });


            if ($("#state").val() == "1") {
                $("#registeStatus").html('审核成功！');
            } else {
                $("#registeStatus").html('审核失败');
                $("#failMsgContext").html($("#failMsg").val());
            }

            if ($("#state").val() == "1") {
                $('.registerPass').css('display', 'block');
                $('.registerFail').css('display', 'none');
            } else {
                $('.registerPass').css('display', 'none');
                $('.registerFail').css('display', 'block');
            }

            $('.showReason').on('click', function () {
                $('.failReason').css('display', 'block');
            });

            $('.close').on('click', function () {
                $('.failReason').css('display', 'none');
            });
        });
    </script>
</head>
<body>
<header>
    <div class="register-title">
        <span>商户入驻</span>
        <div class="step">
            <ul class="clearfix">
                <li>
                    <span class="step1 ">1</span>
                    <span class="stepStatus">申请成功</span>
                    <span class="stepDate"><%=request.getAttribute("createDate")%></span>
                </li>
                <i></i>
                <li>
                    <span class="step1 ">2</span>
                    <span class="stepStatus">审核中</span>
                    <span class="stepDate"><%=request.getAttribute("beginDate")%></span>
                </li>
                <i></i>
                <li>
                    <input id="state" type="hidden" value='<%=request.getAttribute("state")%>'>
                    <input id="failMsg" type="hidden" value='<%=request.getAttribute("failMsg")%>'>

                    <span class="step1 active">3</span>
                    <span class="stepStatus" id="registeStatus"></span>
                    <span class="stepDate"><%=request.getAttribute("endDate")%></span>
                </li>
            </ul>
        </div>
    </div>
</header>
<div class="content">
    <div class="goods-info registerPass">
        <span class="title">审核通过</span>
        <div class="info pass">
            <div class="message">
                <h2>恭喜您申请的普通店铺已审核通过，登录后可进入商户后台！</h2>
                <span>审核通过，您已获得开店权利！</span>
                <div class="linkUs"><p></p></div>
            </div>
        </div>
        <div class="jump">
            <input onclick="back()" class="back" id="back1" type="button" value="返回首页">
        </div>
    </div>
    <div class="goods-info registerFail" style="display:none;">
        <span class="title">审核未通过</span>
        <div class="info fail">
            <div class="message">
                <h2>很遗憾，您申请的普通店铺未审核通过，请重新申请！</h2>
                <span><a class="showReason">查看未通过原因 >></a></span>
                <div class="linkUs"><p>如您有其它疑问，请拨打服务热线：400-166-3828</p></div>
            </div>
        </div>

        <div class="jump">
            <input onclick="back()" class="back" type="button" value="返回首页">
            <input class="back" id="regagin" type="button" value="重新申请">
        </div>
    </div>

</div>
<div class="failReason clearfix" style="display: none;">
    <div class="close"></div>
    <p class="failReasonTitle">审核失败原因</p>
    <p class="failReasonContent" id="failMsgContext"><%=request.getAttribute("failMsg")%>
    </p>
</div>
</body>
</html>
